/*     */ package com.qmsk.business.order.cart.dao;
/*     */ 
/*     */ import com.qmsk.business.sys.basic.SupportDAO;
/*     */ import com.utils.gson.in.GsonHeadOneRow;
/*     */ import com.utils.gson.out.GsonEbRst;
/*     */ import java.sql.SQLException;
/*     */ import java.util.HashMap;
/*     */ import java.util.Map;
/*     */ import org.springframework.stereotype.Repository;
/*     */ 
/*     */ @Repository
/*     */ public class CartDAO extends SupportDAO
/*     */ {
/*     */   public GsonHeadOneRow checkGoodsExist(Long goodsId, String openId)
/*     */     throws SQLException
/*     */   {
/*  26 */     Map params = new HashMap();
/*  27 */     params.put("goodsId", goodsId);
/*  28 */     params.put("openId", openId);
/*  29 */     return getOneRowOfParams("checkGoodsExist", params);
/*     */   }
/*     */ 
/*     */   public GsonHeadOneRow findCartNum(Long cartId)
/*     */     throws SQLException
/*     */   {
/*  41 */     Map params = new HashMap();
/*  42 */     params.put("cartId", cartId);
/*  43 */     return getOneRowOfParams("findCartNum", params);
/*     */   }
/*     */ 
/*     */   public GsonEbRst getcartGoodsList(String openId) throws SQLException {
/*  47 */     Map params = new HashMap();
/*  48 */     params.put("openId", openId);
/*  49 */     return getGsonOfParams("cartGoodsList", params, false);
/*     */   }
/*     */ 
/*     */   public Float getTotalMoney(String openId)
/*     */     throws SQLException
/*     */   {
/*  60 */     Map params = new HashMap();
/*  61 */     params.put("openId", openId);
/*  62 */     String str = queryForString("getTotalMoney", params, "0.00");
/*  63 */     Float money = null;
/*     */     try {
/*  65 */       money = Float.valueOf(Float.parseFloat(str));
/*     */     } catch (Exception e) {
/*  67 */       money = Float.valueOf(0.0F);
/*     */     }
/*  69 */     return money;
/*     */   }
/*     */ 
/*     */   public Integer getTotalIntegral(String openId)
/*     */     throws SQLException
/*     */   {
/*  80 */     Map params = new HashMap();
/*  81 */     params.put("openId", openId);
/*  82 */     return queryForInt("getTotalIntegral", params, Integer.valueOf(2147483647));
/*     */   }
/*     */ 
/*     */   public int updateSubmitOrder(Long orderId, String openId)
/*     */     throws SQLException
/*     */   {
/*  95 */     Map params = new HashMap();
/*  96 */     params.put("orderId", orderId);
/*  97 */     params.put("openId", openId);
/*  98 */     return update("updateOrderInfo", params);
/*     */   }
/*     */ 
/*     */   public int delteOrder(Long orderId)
/*     */     throws SQLException
/*     */   {
/* 110 */     Map params = new HashMap();
/* 111 */     params.put("orderId", orderId);
/* 112 */     return update("deleteOrder", params);
/*     */   }
/*     */ 
/*     */   public int queryCartNums(String openId)
/*     */     throws SQLException
/*     */   {
/* 123 */     Map params = new HashMap();
/* 124 */     params.put("openId", openId);
/* 125 */     return queryForInt("queryCartNums", params, Integer.valueOf(0)).intValue();
/*     */   }
/*     */ 
/*     */   public GsonHeadOneRow getReceiveInfo(String openId)
/*     */     throws SQLException
/*     */   {
/* 138 */     Map params = new HashMap();
/* 139 */     params.put("openId", openId);
/* 140 */     return getOneRowOfParams("getReceiveInfo", params);
/*     */   }
/*     */ }

/* Location:           C:\Users\Administrator\Desktop\新建文件夹\WEB-INF\classes\
 * Qualified Name:     com.qmsk.business.order.cart.dao.CartDAO
 * JD-Core Version:    0.5.3
 */